<template>
<div>
 <el-color-picker v-bind="elProps" v-model="value" @change="change"/>
</div>
</template>

<script setup>
import { ref,watch } from 'vue' 
const props = defineProps({
    elProps:Object,
    modelValue:String
})
const value = ref()
value.value = props.modelValue
watch(()=>props.modelValue,(newval)=>{
value.value = newval
})
const emit = defineEmits(['update:modelValue'])
const change = ()=>{
    console.log(value.value);
    emit('update:modelValue',value.value)
}

</script>

<style lang='scss' scoped>

</style>